home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20041116-20060924 / 000362_toastyboy@googlemail.com_Wed Jun 21 12:09:44 2006.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!panix!bloom-beacon.mit.edu!4.24.21.218.MISMATCH!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r2g2000cwb.googlegroups.com!not-for-mail
  2. From: toastyboy@googlemail.com
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Assigning output from LINEOUT to a variable
  5. Date: 20 Jun 2006 08:14:18 -0700
  6. Organization: http://groups.google.com
  7. Lines: 49
  8. Message-ID: <1150816457.938186.136820@r2g2000cwb.googlegroups.com>
  9. References: <1150811644.629253.47720@r2g2000cwb.googlegroups.com>
  10.    <slrne9g25a.h41.fdc@sesame.cc.columbia.edu>
  11. NNTP-Posting-Host: 64.69.191.231
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset="iso-8859-1"
  14. X-Trace: posting.google.com 1150816461 9914 127.0.0.1 (20 Jun 2006 15:14:21 GMT)
  15. X-Complaints-To: groups-abuse@google.com
  16. NNTP-Posting-Date: Tue, 20 Jun 2006 15:14:21 +0000 (UTC)
  17. In-Reply-To: <slrne9g25a.h41.fdc@sesame.cc.columbia.edu>
  18. User-Agent: G2/0.2
  19. X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
  20. X-HTTP-Via: 1.0 TROW-ISA1
  21. Complaints-To: groups-abuse@google.com
  22. Injection-Info: r2g2000cwb.googlegroups.com; posting-host=64.69.191.231;
  23.    posting-account=9CvZkQ0AAABEiymyFVJPVVB65tz-PEMS
  24. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15619
  25.  
  26. Frank,
  27.  
  28. Thanks for your response.
  29.  
  30. Regarding parsing the output, here is what I would simply expect to see
  31. either a 1 or a 0 (depending on the state of the input) followed by a #
  32. on a new line.
  33.  
  34. (The # is the command prompt on this device if you like)
  35.  
  36. See the below extract from an interactive session:
  37.  
  38. #
  39. #I1
  40. 1
  41. #I2
  42. 1
  43. #I3
  44. 1
  45. #I4
  46. 0
  47. #
  48.  
  49. What I want is either to set the 0 or 1 as a variable and then based on
  50. this write out a file with the 0 or 1 in it, or (better still) write
  51. the 0 or 1 out to a file directly.
  52.  
  53. Thanks for the comprehensive response by the way, it is much
  54. appreciated.
  55.  
  56.  
  57. As a bit of background, what I am actually doing is effectively making
  58. a file based interface to this serial module, it has 8 outputs and 4
  59. inputs which can be either on (1) or off (0) I want to be able to
  60. control it via 12 files OUT11 - 18 and IN11-14 who's content is either
  61. a 1 or 0 to represent the desired output of the out lines, or the
  62. actual status of the in lines.
  63. I'm actually using it already to do some really cool home automation
  64. stuff (I have 5 of these devices) and other assorted stuff, but the
  65. current setup where I call the kermit script via a bash script (and
  66. have to open and configure the serial connection each time) is really
  67. slow and cpu intensive, so the plan is to have this new deamon
  68. constantly looping and reading the status of the module and then I have
  69. lots of shell scripts that check these files and make decisions based
  70. on them...  but I guess this is a bit off topic so I'll stop now!! ;-)
  71.  
  72. Thanks again
  73. -Dan Mc
  74.